
package ija.net;

import java.io.Serializable;

/**
 *
 * @author Radek Necas, xnecas18
 */
public class Message implements Serializable {
    
    protected MessageType type;
    protected String details;
    
    public Message(MessageType type, String details) {
        this.type = type;
        this.details = details;
    }
    
    public MessageType getType() {
        return type;
    }
    
    public String getDetails() {
        return details;
    }
    
    
    public void setType(MessageType newType) {
        type = newType;
    }
    
    public void setDetails(String s) {
        details = s;
    }
    
    @Override
    public String toString() {
        return("Type: " + type.toString() + "\n" + details);
    }
    
    
}
